package com.jqq.interface_;

public class InterfaceDetail {
    public static void main(String[] args) {
        //证明接口中的属性是public final int
        System.out.println(IB.n1);//类。属性名 --》static
//        IB.n1 = 30;//报错 final不可再赋值
        Pig pig = new Pig();
        System.out.println(pig.n1);
        System.out.println(Pig.n1);
    }
}
interface IB{
    int n1 = 10;//等价于public static final int n1 = 10;
    void say();
}
interface IC{
    void ok();
}


class Pig implements IB , IC{

    @Override
    public void say() {

    }

    @Override
    public void ok() {

    }
}